using System;
using System.Xml;
using System.Collections.Generic;

namespace RoverStudio.Common.SysDiagram
{
	public delegate void StateChangedEventHandler(object sender, StateChangedEventArgs sce);
	
	public enum ComponentState
	{
		Stopped,
		Starting,
		Running,
		Stopping
	}

	public class StateChangedEventArgs : EventArgs
	{
		private ComponentState newState;
		private ComponentState oldState;

		public ComponentState NewState
		{
			get
			{
				return this.newState;
			}
			set
			{
				this.newState = value;
			}
		}

		public ComponentState OldState
		{
			get
			{
				return this.oldState;
			}
			set
			{
				this.oldState = value;
			}
		}
		
		public StateChangedEventArgs(ComponentState oldState, ComponentState newState)
		{
			this.oldState = oldState;
			this.newState = newState;
		}
	}
}
